/**
 * Created by zengyx on 16/12/17.
 */
import send from './http'
export default {
  refreshUndealNum () {
    let req = {
      data: {flag: 'kf'},
      action: 'app.business.refreshUndealNum'
    }
    return send.fetch(req, 'post', true)
  },
  readBusiness (data) {
    let req = {
      data,
      action: 'app.business.readBusiness'
    }
    return send.fetch(req, 'post')
  },
  getRoleUnDealBusiness (data) {
    let req = {
      data,
      action: 'app.business.getRoleUnDealBusiness'
    }
    return send.fetch(req, 'post')
  },
  getUnDealBusiness (data) {
    let req = {
      data,
      action: 'app.business.getUnDealBusiness'
    }
    return send.fetch(req, 'post')
  },
  getAssignedBusiness (data) {
    let req = {
      data,
      action: 'app.business.getAssignedBusiness'
    }
    return send.fetch(req, 'post')
  },
  getFollowedBusiness (data) {
    let req = {
      data,
      action: 'app.business.getFollowedBusiness'
    }
    return send.fetch(req, 'post')
  },
  queryAllBusiness (data) {
    let req = {
      data,
      action: 'app.business.queryBusByScope'
    }
    return send.fetch(req, 'post')
  },
  getAllUncompleteBusiness (data) {
    let req = {
      data,
      action: 'app.business.getAllUncompleteBusiness'
    }
    return send.fetch(req, 'post')
  },
  getAllFinishedBusiness (data) {
    let req = {
      data,
      action: 'app.business.getAllFinishedBusiness'
    }
    return send.fetch(req, 'post')
  },
  addBusinessTask (data) {
    let req = {
      data,
      action: 'app.business.addBusinessTask'
    }
    return send.fetch(req, 'post')
  },
  addTempBusinessTask (data) {
    let req = {
      data,
      action: 'app.business.addTempBusinessTask'
    }
    return send.fetch(req, 'post')
  },
  getBusinessDetailById (data) {
    // 请求不要mask的传值
    let hiddenLoad = data.hiddenLoad
    delete data.hiddenLoad
    let req = {
      data,
      action: 'app.business.getBusinessDetailById'
    }
    return send.fetch(req, 'post', hiddenLoad)
  },
  getBusinessDetailByIdHideLoad (data) {
    let req = {
      data,
      action: 'app.business.getBusinessDetailById'
    }
    return send.fetch(req, 'post', true)
  },
  addBusinessBackInfo (data) {
    let req = {
      data,
      action: 'app.business.addBusinessBackInfo'
    }
    return send.fetch(req, 'post')
  },
  changeBusinessMaster (data) {
    let req = {
      data,
      action: 'app.business.changeBusinessMaster'
    }
    return send.fetch(req, 'post')
  },
  setTaskToMe (data) {
    let req = {
      data,
      action: 'app.business.setTaskToMe'
    }
    return send.fetch(req, 'post')
  },
  excuteBusinessStepAction (data) {
    let req = {
      data,
      action: 'app.business.excuteBusinessStepAction'
    }
    return send.fetch(req, 'post')
  },
  // 工单动作某一步的暂存  =====
  saveTempStepInfo (data) {
    let req = {
      data,
      action: 'app.business.saveTempStepInfo'
    }
    return send.fetch(req, 'post')
  },
  excuteBusinessBackAction (data) {
    let req = {
      data,
      action: 'app.business.excuteBusinessBackAction'
    }
    return send.fetch(req, 'post')
  },
  delBusAttach (data) {
    let req = {
      data,
      action: 'app.business.delBusAttach'
    }
    return send.fetch(req, 'post')
  },
  getBusinessCount (data) {
    let req = {
      data,
      action: 'app.business.getBusinessCount'
    }
    return send.fetch(req, 'post')
  },
  deleteBusiness (data) {
    let req = {
      data,
      action: 'app.business.deleteBusiness'
    }
    return send.fetch(req, 'post')
  },
  getCustomerHistoryBusiness (data) {
    let req = {
      data,
      action: 'app.business.getCustomerHistoryBusiness'
    }
    return send.fetch(req, 'post')
  },
  exportBusiness (data) {
    let req = {
      data,
      action: 'app.business.exportBusiness'
    }
    return send.fetch(req, 'post')
  },
  setFollowedAgents (data) {
    let req = {
      data,
      action: 'app.business.setFollowedAgents'
    }
    return send.fetch(req, 'post')
  },
  //关联工单
  changeBusinessRelated (data) {
    let req = {
      data,
      action: 'app.business.changeBusinessRelated'
    }
    return send.fetch(req, 'post')
  },
  addQuickSearch (data) {
    let req = {
      data,
      action: 'app.business.addQuickSearch'
    }
    return send.fetch(req, 'post')
  },
  setDefaultQuickSearch (data) {
    let req = {
      data,
      action: 'app.business.setDefaultQuickSearch'
    }
    return send.fetch(req, 'post')
  },
  updateQuickSearch (data) {
    let req = {
      data,
      action: 'app.business.updateQuickSearch'
    }
    return send.fetch(req, 'post')
  },
  removeQuickSearch (data) {
    let req = {
      data,
      action: 'app.business.removeQuickSearch'
    }
    return send.fetch(req, 'post')
  },
  queryQuickSearchById (data) {
    let req = {
      data,
      action: 'app.business.queryQuickSearchById'
    }
    return send.fetch(req, 'post')
  },
  queryQuickSearchList (data) {
    let req = {
      data,
      action: 'app.business.queryQuickSearchList'
    }
    return send.fetch(req, 'post')
  },
  queryQuickSearchListAll (data) {
    let req = {
      data,
      action: 'app.business.queryQuickSearchListAll'
    }
    return send.fetch(req, 'post')
  },
  addExportTask (data) {
    let req = {
      data,
      action: 'app.business.addExportTask'
    }
    return send.fetch(req, 'post')
  },
  deleteExportTask (data) {
    let req = {
      data,
      action: 'app.business.deleteExportTask'
    }
    return send.fetch(req, 'post')
  },
  getExportTaskList (data) {
    let req = {
      data,
      action: 'app.business.getExportTaskList'
    }
    return send.fetch(req, 'post')
  },
  reExportTask (data) {
    let req = {
      data,
      action: 'app.business.reExportTask'
    }
    return send.fetch(req, 'post')
  },
  addConfigBusinessBackInfo (data) {
    let req = {
      data,
      action: 'app.business.addConfigBusinessBackInfo'
    }
    return send.fetch(req, 'post')
  },
  queryConfigBusinessById (data) {
    let req = {
      data,
      action: 'config.business.queryConfigBusinessById'
    }
    return send.fetch(req, 'post')
  },
  batchAssign (data) {
    let req = {
      data,
      action: 'app.business.batchAssign'
    }
    return send.fetch(req, 'post')
  },
  batchClaim (data) {
    let req = {
      data,
      action: 'app.business.batchClaim'
    }
    return send.fetch(req, 'post')
  },
  batchExecute (data) {
    let req = {
      data,
      action: 'app.business.batchExecute'
    }
    return send.fetch(req, 'post')
  },
  batchBack (data) {
    let req = {
      data,
      action: 'app.business.batchBack'
    }
    return send.fetch(req, 'post')
  },
  setBusLaterProcess (data) {
    let req = {
      data,
      action: 'app.business.setBusLaterProcess'
    }
    return send.fetch(req, 'post')
  },
  changeBusinessPriority (data) {
    let req = {
      data,
      action: 'app.business.changeBusinessPriority'
    }
    return send.fetch(req, 'post')
  },
  // 催办内容
  addUrgeContent (data) {
    let req = {
      data,
      action: 'app.business.addUrgeContent'
    }
    return send.fetch(req, 'post')
  }
}
